import request from '@/utils/request'

// 查询组织信息列表
export function listOrg(query) {
  return request({
    url: '/committee/org/list',
    method: 'get',
    params: query
  })
}
// 查询成员任命信息列表2
export function listMember222(query) {
  return request({
    url: '/committee/member/list2',
    method: 'get',
    params: query
  })
}
// 查询组织信息详细
export function getOrg(orgId) {
  return request({
    url: '/committee/org/' + orgId,
    method: 'get'
  })
}
// 查询指导老师详细
// export function getManTeacher(orgId) {
//   return request({
//     url: '/committee/org/' + orgId,
//     method: 'get'
//   })
// }

// 新增组织信息
export function addOrg(data) {
  return request({
    url: '/committee/org',
    method: 'post',
    data: data
  })
}
// 批量修改考核
export function upOrg(data) {
  return request({
    url: '/committee/member/updateList',
    method: 'post',
    data: data
  })
}

// 修改组织信息
export function updateOrg(data) {
  return request({
    url: '/committee/org',
    method: 'put',
    data: data
  })
}

// 删除组织信息
export function delOrg(orgId) {
  return request({
    url: '/committee/org/' + orgId,
    method: 'delete'
  })
}

// 学生管理员下拉框
export function getstudentmanager(parm) {
  return request({
    url: '/committee/org/getstudentmanager/' + parm,
    method: 'get'
  })
}
// 教师管理员下拉框
export function getTeacherManager(parm) {
  return request({
    url: '/committee/org/getTeacherManager/' + parm,
    method: 'get'
  })
}
// 查询指导单位列表
export function unitNameList(query) {
  return request({
    url: '/committee/org/guideUnitList',
    method: 'get',
    params: query
  })
}

// 设置学生管理员
export function setteachermanager(data) {
  return request({
    url: '/committee/org/setteachermanager',
    method: 'put',
    data: data
  })
}

export function setstudentmanager(data) {
  return request({
    url: '/committee/org/setstudentmanager',
    method: 'put',
    data: data
  })
}

// 显示二维码
export function showQrCode(orgId) {
  return request({
    url: '/committee/org/createQrCode?orgId=' + orgId,
    method: 'get',
  })
}

//下载图片
export function downloadImgs(params) {
  return request({
    url: '/common/download/url',//后端自定义的下载接口/common/download/url，路径为admin模块的com.ruoyi.web.controller.common;
    responseType: 'blob', //设置后端返回类型为二进制流，不设置会返回乱码
    method: 'get',
    params
  })
}